/** @jsxImportSource @emotion/react */
import * as React from "react";
import {  OriginalViewProps,  } from "../../common/base";
import {AdaptingMedium, EntranceSetup,} from "./orcBase";
import { createItem,  } from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {ConclusionTank,  VsProjects默认} from "./editor";
import {config资料审查, FactoryMaterial} from "./editorReview";
import {Macroscopic,} from "./editorMacr";
import {Attachments, } from "./editorAcces";
import {Certificate, } from "./editorCert";
import {ThreeConfigRaft} from "../../gas/editor";
import {ProjectList} from "../editor";


export const configSetter=(verId:string,orc?:any)=>{
  return  config资料审查(orc);
};
const defvcbFunc = (par: any) => {
  return  par;
};

//独立的分项报告的编辑器不在此列出的：
const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectList config={VsProjects默认} label={'目录页'}/>),
  createItem('Conclusion', <ConclusionTank label={'检验结论报告-下结论'}/>),
  createItem('MaterialReview', <ThreeConfigRaft config={configSetter} label={'资料审查-(上)'} defValCb={defvcbFunc} adField={['盛装介质']}>
      注：以上资料审查设备概况除在台账业务信息中可修改外还需修改的部分。
     </ThreeConfigRaft>),
  createItem('FactoryMaterial', <FactoryMaterial label='资料审查-(下)'/>),
  createItem('AdaptingMedium', <AdaptingMedium label='适装介质列表'/>),
  createItem('Macroscopic', <Macroscopic label={'罐体宏观检验报告'}/>),
  createItem('Attachments', <Attachments label={'附件检验报告'}/>),
  createItem('Certificate', <Certificate label={'罐式车辆常压容器(罐体)合格证'}/>),
  createItem('_Controller',  <></>),
];

export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
